package com.example.okhttp;

/**
 * @author:0.2℃
 * @date： 2022-01-05 07:08
 * @version:
 * @Description ：
 */
public class MNOkhttp {
    public static<T, M> void sendJsonRequest(T requestData, String url, Class<T> responseData, IJsonDataListener listener) {
        IHttpRequest httpRequest = new JsonHttpRequest();
        CallbackListener callbackListener = new JsonCallbackListener<>(responseData, listener);
        HttpTask task = new HttpTask(url, requestData, httpRequest, callbackListener);
        ThreadPoolManager.getInstance().addTask(task);
    }
}
